<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>自定义接口测试</title>
    <link rel="icon" href="../static/images/favicon.ico"/>
    <link rel="stylesheet" type="text/css" href="../static/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="../static/css/jquery.mloading.css">
    <link rel="stylesheet" type="text/css" href="../static/css/selfAPI.css">
    <script type="text/javascript" src="../static/js/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="../static/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../static/js/bootbox.min.js"></script>
    <script type="text/javascript" src="../static/js/jquery.mloading.js"></script>
    <script type="text/javascript" src="../static/js/self_api.js"></script>
</head>
<body>
<div id="wrap">
    <div class="panel panel-default">
        <div class="panel-body">
            <div class="row tableHeader">
                <div style="text-align: center"
                     class="col-lg-1 col-md-1 col-sm-1 col-xs-1 ">
                    编码
                </div>
                <div style="text-align: center"
                     class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                    名称
                </div>
                <div style="text-align: center"
                     class="col-lg-5 col-md-5 col-sm-5 col-xs-5">
                    上传／下载
                </div>
                <div style="text-align: center"
                     class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
                    操作
                </div>
            </div>
        </div>
    </div>
    <div class="tablebody">
        <div class="row">
            <div style="text-align: center"
                 class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
                <span style="background-color: #2aabd2" class="badge">1</span>
            </div>
            <div style="text-align: center"
                 class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <span>闪电借款</span>
            </div>
            <div style="text-align: center"
                 class="col-lg-5 col-md-5 col-sm-5 col-xs-5">
                <input class="file-style" type="file" id="file_upload_jk" name="file">
                <button class="btn-xs btn btn-default">选择文件</button>
                <button class="btn btn-xs btn-warning"
                        onclick=FileUpload_jk()>上传
                </button>
                <button class="btn btn-success btn-xs"
                        onclick="window.location.href='/v1/download_file?p=jk'">下载
                </button>
            </div>
            <div style="text-align: center" class="section3">
                <button class="btn btn-default btn-xs" data-toggle="modal"
                        data-target="#myEmail">邮件
                </button>

                <button id="btnruner1" class="btn btn-success btn-xs"
                        data-loading-text="执行中"
                        onclick="run1()">执行
                </button>
            </div>
        </div>
    </div>
    <div class="tablebody">
        <div class="row">
            <div style="text-align: center"
                 class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
                <span style="background-color: #2aabd2" class="badge">2</span>
            </div>
            <div style="text-align: center"
                 class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <span>掌e贷</span>
            </div>
            <div style="text-align: center"
                 class="col-lg-5 col-md-5 col-sm-5 col-xs-5">
                <input class="file-style" type="file" id="file_upload_zed" name="file">
                <button class="btn-xs btn btn-default">选择文件</button>
                <button class="btn btn-xs btn-warning"
                        onclick=FileUpload_zed()>上传
                </button>
                <button class="btn btn-success btn-xs"
                        onclick="window.location.href='/v1/download_file?p=zed'">下载
                </button>
            </div>
            <div style="text-align: center" class="section3">
                <button class="btn btn-default btn-xs" data-toggle="modal"
                        data-target="#myEmail">邮件
                </button>

                <button id="btnruner2" class="btn btn-success btn-xs"
                        data-loading-text="执行中"
                        onclick="run2()">执行
                </button>
            </div>
        </div>
    </div>
    <div class="tablebody">
        <div class="row">
            <div style="text-align: center"
                 class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
                <span style="background-color: #2aabd2" class="badge">3</span>
            </div>
            <div style="text-align: center"
                 class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                <span>掌众财富</span>
            </div>
            <div style="text-align: center"
                 class="col-lg-5 col-md-5 col-sm-5 col-xs-5">
                <input class="file-style" type="file" id="file_upload_cf" name="file">
                <button class="btn-xs btn btn-default">选择文件</button>
                <button class="btn btn-xs btn-warning"
                        onclick=FileUpload_cf()>上传
                </button>
                <button class="btn btn-success btn-xs"
                        onclick="window.location.href='/v1/download_file?p=cf'">下载
                </button>
            </div>
            <div style="text-align: center" class="section3">
                <button class="btn btn-default btn-xs" data-toggle="modal"
                        data-target="#myEmail">邮件
                </button>

                <button id="btnruner3" class="btn btn-success btn-xs"
                        data-loading-text="执行中"
                        onclick="run3()">执行
                </button>
            </div>
        </div>
    </div>
    <br>
    <div style="text-align:left;bottom: 10px;color: #ff1213">
        <span>1.服务器暂支持python2.7的环境,请以2.7的环境基础编写测试代码,如果有依赖的库请联系我们安装。</span><br/>
        <span>2.点击项目所在行“上传代码”，可以将本地代码上传至服务器，上传的代码必须打包成.zip格式，并且文件不大于5M，才可上传。</span><br/>
        <span>3.点击项目所在行“下载最新代码”，可以将服务器最新代码下载至本地。</span><br/>
        <span>4.测试case文件以test开头命名，例test_jiekuan_01.py, 非以test开头测试case文件会被忽略执行。</span><br/>
        <span>5.点击“邮件”按钮，会弹出一个输入框，可在输入框中输入想要发送的收件人，如果有多个收件人以英文分号（;）隔开，如果不输入收件人，则报告发送给默认收件人。</span><br/>
        <span>6.点击“执行”按钮，会执行最新的代码，执行完成后自动发送测试报告邮件。
注意：执行人上传代码后，下次任何人执行自动化测试，将会以最新代码执行，原来的代码将失效，但是之前代码会在服务器备份。</span>
    </div>
</div>

<div class="modal fade" id="myEmail" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close"
                        data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    邮件</h4>
            </div>
            <div class="modal-body">
                                <textarea id="Addemail" type="text"
                                          class="form-control"
                                          placeholder="请输入收件人,多人用;隔开！"></textarea>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default"
                        data-dismiss="modal"
                        onclick="saveEmail()">保存
                </button>
            </div>
        </div>
    </div>
</div>

</body>
</html>